//dbassert  数据库数据验证
var mysql = require('mysql')


var mysql_1_51 = {
    host: '10.100.2.12',
    user: 'root',
    password: 'Wo4heike',
    database: 'yingxinxin-qa',
    port: 3306
}

var mysql_2_12 = {
    host: '10.100.2.12',
    user: 'root',
    password: 'Wo4heike',
    database: 'yingxinxin-qa',
    port: 3306
}



var pool = mysql.createPool({
    host: '10.100.2.12',
    user: 'root',
    password: 'Wo4heike',
    database: 'yingxinxin-qa',
    port: 3306
})

var query = function (sql, sqlparam, callback) {
    pool.getConnection(function (err, conn) {
        if (err) {
            callback(err, null, null)
        } else {
            conn.query(sql, function (qerr, vals, fields) {
                conn.release();
                callback(qerr, vals, fields)
            })
        }
    })
}

module.exports = {query, pool}
//module.exports=pool
//export {query}


console.log(new Date())
